#!/bin/bash

#Soffice port
export SOFFICE_PORT=8100

KillSoffice() {
	printf "\nKilling Soffice... \n"
	PID=$(ps -ef | grep $SOFFICE_PORT | grep -v grep | awk '{ print $2 }')
	if [ -z $PID ]
	then
	 echo Soffice is already stopped
	else
	 echo kill $PID for Soffice
	 kill -9 $PID
	fi
}


###################################

KillSoffice

###################################
